package com.live.shop.model;

import org.json.JSONObject;

public class UserModel {
    int uuid;
    String nickname;
    String account;
    String password;
    String endtime;
    String headurl;
    int status; //用户状态 0其他设备登录 1正常
    int commentKeep; //保留评论 0不保留 1保留
    int prologueInterval; //直播话术间隔（秒）
    int prologueBreak; //允许话术被公屏打断 0不允许 1允许
    int prologueRestart; //打断的话术是否从开头播放 0不是 1是
    int prologuePlaytype; //话术播放方式 0轮播 1随机
    int keywordKeeptype; //关键词回复播放 0评论实时 1评论历史
    String pcIp;//电脑端ip
    int functionId;//选择哪个应用平台
    int functionEventCode;
    String functionResid;
    String functionPackage;
    String token;
    String aliyunAccessKeyID;
    String aliyunAccessKeySecret;
    String aliyunAppkey;
    String aliyunVoiceSelect;
    String aliyunFontName;
    String aliyunSpeedLevel;
    String aliyunVolume;
    String aliyunToken;
    long aliyunExpiredTime;

    public static JSONObject model2Json(UserModel model){
        JSONObject json = new JSONObject();
        try {
            json.put("commentKeep",model.getCommentKeep());
            json.put("prologueInterval",model.getPrologueInterval());
            json.put("prologueBreak",model.getPrologueBreak());
            json.put("prologueRestart",model.getPrologueRestart());
            json.put("prologuePlaytype",model.getProloguePlaytype());
            json.put("keywordKeeptype",model.getKeywordKeeptype());
        }catch (Exception e){
            e.printStackTrace();
        }
        return json;
    }
    public static UserModel json2Model(JSONObject json){
        UserModel model = new UserModel();
        try {
            model.setCommentKeep(json.getInt("commentKeep"));
            model.setPrologueInterval(json.getInt("prologueInterval"));
            model.setPrologueBreak(json.getInt("prologueBreak"));
            model.setPrologueRestart(json.getInt("prologueRestart"));
            model.setProloguePlaytype(json.getInt("prologuePlaytype"));
            model.setKeywordKeeptype(json.getInt("keywordKeeptype"));
        }catch (Exception e){
            e.printStackTrace();
        }
        return model;

    }
    public int getProloguePlaytype() {
        return prologuePlaytype;
    }

    public void setProloguePlaytype(int prologuePlaytype) {
        this.prologuePlaytype = prologuePlaytype;
    }

    public int getKeywordKeeptype() {
        return keywordKeeptype;
    }

    public void setKeywordKeeptype(int keywordKeeptype) {
        this.keywordKeeptype = keywordKeeptype;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getUuid() {
        return uuid;
    }

    public void setUuid(int uuid) {
        this.uuid = uuid;
    }

    public String getPcIp() {
        return pcIp;
    }

    public void setPcIp(String pcIp) {
        this.pcIp = pcIp;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEndtime() {
        return endtime;
    }

    public void setEndtime(String endtime) {
        this.endtime = endtime;
    }

    public String getHeadurl() {
        return headurl;
    }

    public void setHeadurl(String headurl) {
        this.headurl = headurl;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getToken() {
        return token;
    }

    public int getCommentKeep() {
        return commentKeep;
    }

    public void setCommentKeep(int commentKeep) {
        this.commentKeep = commentKeep;
    }

    public int getPrologueInterval() {
        return prologueInterval;
    }

    public void setPrologueInterval(int prologueInterval) {
        this.prologueInterval = prologueInterval;
    }

    public int getPrologueBreak() {
        return prologueBreak;
    }

    public void setPrologueBreak(int prologueBreak) {
        this.prologueBreak = prologueBreak;
    }

    public int getPrologueRestart() {
        return prologueRestart;
    }

    public void setPrologueRestart(int prologueRestart) {
        this.prologueRestart = prologueRestart;
    }

    public int getFunctionId() {
        return functionId;
    }

    public void setFunctionId(int functionId) {
        this.functionId = functionId;
    }

    public int getFunctionEventCode() {
        return functionEventCode;
    }

    public void setFunctionEventCode(int functionEventCode) {
        this.functionEventCode = functionEventCode;
    }

    public String getFunctionResid() {
        return functionResid;
    }

    public void setFunctionResid(String functionResid) {
        this.functionResid = functionResid;
    }

    public String getFunctionPackage() {
        return functionPackage;
    }

    public void setFunctionPackage(String functionPackage) {
        this.functionPackage = functionPackage;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getAliyunAccessKeyID() {
        return aliyunAccessKeyID;
    }

    public void setAliyunAccessKeyID(String aliyunAccessKeyID) {
        this.aliyunAccessKeyID = aliyunAccessKeyID;
    }

    public String getAliyunAccessKeySecret() {
        return aliyunAccessKeySecret;
    }

    public void setAliyunAccessKeySecret(String aliyunAccessKeySecret) {
        this.aliyunAccessKeySecret = aliyunAccessKeySecret;
    }

    public String getAliyunAppkey() {
        return aliyunAppkey;
    }

    public void setAliyunAppkey(String aliyunAppkey) {
        this.aliyunAppkey = aliyunAppkey;
    }

    public String getAliyunVoiceSelect() {
        return aliyunVoiceSelect;
    }

    public void setAliyunVoiceSelect(String aliyunVoiceSelect) {
        this.aliyunVoiceSelect = aliyunVoiceSelect;
    }

    public String getAliyunFontName() {
        return aliyunFontName;
    }

    public void setAliyunFontName(String aliyunFontName) {
        this.aliyunFontName = aliyunFontName;
    }

    public String getAliyunSpeedLevel() {
        return aliyunSpeedLevel;
    }

    public void setAliyunSpeedLevel(String aliyunSpeedLevel) {
        this.aliyunSpeedLevel = aliyunSpeedLevel;
    }

    public String getAliyunVolume() {
        return aliyunVolume;
    }

    public void setAliyunVolume(String aliyunVolume) {
        this.aliyunVolume = aliyunVolume;
    }

    public String getAliyunToken() {
        return aliyunToken;
    }

    public void setAliyunToken(String aliyunToken) {
        this.aliyunToken = aliyunToken;
    }


    public long getAliyunExpiredTime() {
        return aliyunExpiredTime;
    }

    public void setAliyunExpiredTime(long aliyunExpiredTime) {
        this.aliyunExpiredTime = aliyunExpiredTime;
    }

}
